i spend some time searching for my bug and found out it was a bug in flash:
i create a frame at frame 10, put a movieclip in it and give it an instance
name. in a different layer at frame 10 i put a script to change a property
of the mc's instance. now everything works.
then i copy frame 10 with the movieclip instance to frame 1. i change the
instance name at frame 1 and the movie doesnt work anymore.
hope there will be an update sooon for pc
dirk
<http://www.webadmin.mynetcologne.de/bug/bug_instance.fla>
if you copy the frame 1 to the first layer everything works fine.
no i noticed the problem in one movie and to make sure its a bug i recreated
the szenario. and i recreated it again and the same problem - if you press
ctrl+l at a frame where the second instance should apear, but there still is
the first one.
maybe you could send me the movie you where talking about.
for me the bug works like this:
flash 'thinks' the second keyframe belongs to the same object as it is the
same movieclip (only works with the same object) and ingnores the new
instance.
dirk
If you are only copying the movie clip to the first frame, then the action
on frame 10 will not work until frame 10 action loads ... is this what is
happening?
cheers - ann k
no i have two keyframes and some more frames where the clip still
exists. you cant change the instance name of the same movieclip in the
same layer. you have to create an extra layer where you put the new
frame and then put an empty layer at the old initial layer, otherwise
flash has the old instancename for new instance. i send an email to the
wishlist, so maybe they fix it in an update - if there will be an
update, maybe they are working on a new comercial version.
dirk
Thanks!
Adam
Actually I have reproduced that.
Here's the steps.
-Draw a small rectangle on the stage.
-Select it and hit F8, and then hit Return, so it becomes a movieclip
instance.
-Name it 'mc1' using the Instance panel
-Select Frame10 in _root and hit F5.
-Select Frame11 and hit F6, so it becomes a new keyframe.
-Name the instance in Frame11 as 'mc2' and transform it to 200%.
-Select Frame20 and hit F5.
-Put the following code in Frame5 in _root.
-----------
for (name in this) {
if (typeof (this[name]) == "movieclip") {
trace (this[name]);
}
}
-----------
-Put the same code in Frame15 in _root.
-Put the following in Frame20 in _root.
-----------
this.stop();
-----------
-Then test movie.
You'll see the instance transform and get the following output in the output
window.
-----------
_level0.mc1
_level0.mc1
-----------
I think everything is fine with 'mc2' just except its _name.
It seems like the _name of 'mc1' has been inherited to 'mc2' unexpectedly.
And from a few more tests, I noticed that it only happens when the two
instances' frames touch each other in the timeline. (ie: That doesn't happen
if Frame10 is an empty frame.)
cheers,
TK
Thanks for the steps - I'm seeing the same thing. Will report this to the
team.
Thanks both to Dirk and Tatsuo for the report!
Adam